package com.es.service;

import com.es.entity.BankAccount;

import java.math.BigDecimal;

public interface BankAccountService {

    BankAccount get(String cardNo);

    int save(BankAccount bankAccount);

    int withdraw(String cardNo, BigDecimal amount);

    int deposit(String cardNo, BigDecimal amount);

    /**
     * 转账的方法
     * @param from
     * @param to
     * @param amount
     * @return
     */
    int trans(String from, String to, BigDecimal amount);
}
